package org.example.demos.pattern.chain_pattern_reference;

import lombok.extern.slf4j.Slf4j;
import org.springframework.util.StringUtils;

/**
 * 账号域校验器
 */
@Slf4j
public abstract class AbstractChecker {
 
//    @Resource
//    private PayRecordService payRecordService;
 
    protected boolean preCheck(CheckParam checkParam) {
        if (StringUtils.isEmpty(checkParam.getUid()) && StringUtils.isEmpty(checkParam.getDeviceId())) {
            log.info("preCheck_without_uid or deviceId]");
            return true;
        }
        return false;
    }
 
//    protected String buildPayInfo(CheckParam checkParam) {return null;}
//
//    protected String buildPayHistory(CheckParam checkParam) {return null;}
//
//    protected void buildResult(String checkerCode, CheckResult accountResult, CheckContext checkContext) {
//        // 账号限购、实名制...
//    }
 
}